package com.java.service;

import com.java.entity.Collec;
import com.java.entity.Malfunctions;
import com.java.entity.Orders;
import com.java.entity.User;
import com.java.util.PageUtil;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

public interface UserService {

    //登录
    User login(String userName, String userPassword);
    //注册
    Boolean register(User user);

    //注册前的查询
    User registerPre(String userIdcard);
    User registerPree(String userName);

    //忘记密码
    Boolean forgetPwd( String userName,  String userIdcard,  String userPassword);

    //管理员查看用户列表:分页高级查询
    PageUtil<User> selectAll(Integer currentPage,Integer pageSize,String username);

    //管理员修改用户的登录权限
    void updatePermission(String userId,Boolean permission);
    //根据id查询用户
    User selectById(String userId);

    //房屋报修
    Boolean CallForRepairs(Malfunctions malfunctions);

    //查看收藏
    List<Collec> FindAllCollecsById(int userId);

    //删除收藏
    Boolean DeleteCollecById(int userId,int houseId);

    //查看个人信息
    List<User> FindUserByName(User user);

    //修改个人信息
    Boolean UpdateUserById(User user);

    //查看订单
    List<Orders> findOrdersById(String userId);

    void updateUsertoAdmin(User user);
}
